﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="service_rjcz.aspx.cs" Inherits="service_rjcz1" %>

<%@ Register Src="uc/header.ascx" TagName="header" TagPrefix="uc1" %>
<%@ Register Src="uc/footer.ascx" TagName="footer" TagPrefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="css/base.css" rel="stylesheet" type="text/css" />
    <link href="css/service.css" rel="stylesheet" type="text/css" />
    <link href="css/jquery-ui-1.7.3.custom.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="http://i.ymcps.com/images/float/floatS.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <uc1:header ID="header1" runat="server" />
    <br />
    <div class="channelLayout">
        <!------ 客服专区 频道导航 start ------>
        <div class="topLine">
        </div>
        <div class="service_title service_bg">
        </div>
        <div class="channelNavBg">
            <div class="hqzx_nav_tb">
                <ul>
                    <li><a href="Default.aspx" class="b">客服首页</a></li>
                    <li><a href="service_video.aspx" class="b">培训视频</a></li>
                    <li><a href="servicehelp/index.aspx" target="_blank" class="b">帮助中心</a></li>
                    <li class="hqzx_nav_cur service_bg">自助服务</li>
                    <li><a href="service_feedback.aspx" class="b">意见反馈</a></li>
                    <li><a href="training.aspx" class="b">各地公告</a></li>
                    <li><a href="training1.aspx" class="b">会场预约</a></li>
                    <li><a href="service_map1.aspx" class="b">全国服务商</a></li>
                </ul>
            </div>
        </div>
        <!------ 客服专区 频道导航 end ------>
    </div>
    <div class="clearok">
    </div>
    <!------ 自助服务 start ------>
    <input id="hidName" type="hidden" runat="server" value="" />
    <div class="service_self1 marginTop10 font14 font-weight">
        <img src="images/index_ico2.gif" class="img" />自助服务&nbsp; 
        <a href="http://kefu.emoney.cn/servicehelp/detail2.aspx?infoid=323" 
            target="_blank" style="font-weight:normal;color:Blue">如何使用?</a>
    </div>
    <div class="clearok">
    </div>
    <!------ 软件充值 start ------>
    <div class="self_c marginTop10" id="divrjcz">
        <div class="self_c_l" style="height:380px;">
            <div class="self_login" id="login" att="ulogin">
            </div>
            <ul>
                <li att="ulogin"><a id="qkcl">
                    清空处理</a><div class="self_ico">
                        <img src="images/ico_self1.gif" /></div>
                </li>
                <li att="ulogin"><a href="service_xgmm.aspx">修改密码</a><div class="self_ico">
                    <img src="images/ico_self3.gif" /></div>
                </li>
                <li att="ulogin"><a href="service_dqrcx.aspx">到期日查询</a><div class="self_ico">
                    <img src="images/ico_self4.gif" /></div>
                </li>
                <li class="current">软件充值<div class="self_ico">
                    <img src="images/ico_self5.gif" /></div>
                </li>
                <li att="ulogin"><a href="service_wsjf.aspx">网上积分</a><div class="self_ico">
                    <img src="images/ico_self6.gif" /></div>
                </li>
                <li att="ulogin"><a href="service_wyzs.aspx">我要折算</a><div class="self_ico">
                    <img src="images/ico_self7.gif" /></div>
                </li>
                <li att="ulogin"><a href="service_mmbh.aspx">密码保护</a><div class="self_ico">
                    <img src="images/ico_self8.gif" /></div>
                </li>
                <li att="ulogin"><a id="opendog" style="cursor:hand" href="javascript:void(0)">精灵狗</a><div class="self_ico">
                    <img src="images/smalldog.jpg" style="height: 17px; width: 15px" /></div></li>
            </ul>
        </div>
        <div class="self_c_r" style="height:378px;">
            <div class="self_c_r_c5">
                <div id="diy_form02">
                    <div class="right">
                        <table width="270">
                            <tr>
                                <td align="left" height="30">
                                    供选择的充值类型&nbsp;<br />
                                    <asp:RadioButton name="radio" type="radio" ID="addfee_pc" value="pc" Style="width: 20px"
                                        class="radio" runat="server" Text="PC版" GroupName="a" OnCheckedChanged="addfee_pc_CheckedChanged"
                                        AutoPostBack="True" Checked="true" />
                                    <asp:RadioButton type="radio" name="radio" ID="addfee_mobile" value="mobile" Style="width: 20px"
                                        class="radio" runat="server" Text="手机版" GroupName="a" OnCheckedChanged="addfee_mobile_CheckedChanged"
                                        AutoPostBack="True" />
                                    <asp:RadioButton ID="addfee_HG" Style="border-right: medium none; border-top: medium none;"
                                        type="radio" value="mobileHG" name="radio" runat="server" Text="手机版换购" GroupName="a"
                                        OnCheckedChanged="addfee_HG_CheckedChanged" AutoPostBack="True" />
                                </td>
                            </tr>
                        </table>
                        <asp:Panel ID="Panel1" runat="server" Visible="true">
                            <table id="tbpc">
                                <tr>
                                    <td class="ft_brown14" id="addfee_title" align="left" height="40" name="addfee_title">
                                        PC版操盘手网上充值
                                    </td>
                                </tr>
                                <tr class="pc">
                                    <td>
                                        软件用户名：
                                    </td>
                                    <td>
                                        <asp:TextBox ID="userName_pc" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr class="pc">
                                    <td>
                                        软件密码：
                                    </td>
                                    <td valign="top">
                                        <asp:TextBox ID="softPwd_pc" runat="server" TextMode="Password" Width="126px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr class="pc">
                                    <td>
                                        充值卡卡号：
                                    </td>
                                    <td valign="top">
                                        <asp:TextBox ID="cardId_pc" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr id="trLeveType" style="display:none">
                                    <td colspan="2">
                                        <input id="hLeve" style="border-right: medium none; border-top: medium none; border-left: medium none;
                                            border-bottom: medium none; width: 15px" type="radio" checked="true" value="1"
                                            name="leveType" runat="server" />
                                        <span style="color: red">沪市LV2</span>
                                        <input id="sLeve" style="border-right: medium none; border-top: medium none; border-left: medium none;
                                            border-bottom: medium none; width: 15px" type="radio" value="2" name="leveType"
                                            runat="server" />
                                        <span style="color: red">深市LV2</span>
                                    </td>
                                </tr>
                                <tr class="pc">
                                    <td>
                                        充值卡密码：
                                    </td>
                                    <td valign="top">
                                        <asp:TextBox ID="cardPwd_pc" runat="server" TextMode="Password" Width="126px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr class="pc">
                                    <td>
                                        验证码：
                                    </td>
                                    <td valign="top">
                                        <asp:TextBox ID="codepc" Style="width: 100px" class="input1" runat="server"></asp:TextBox>
                                        <img src="common/RegImg.aspx" id="regImg" alt="请点击" />
                                    </td>
                                </tr>
                                <tr class="pc">
                                    <td colspan="2" align="center">
                                        <asp:ImageButton ID="btnOk_pc" src="images/btn_ok.jpg" border="0" alt="确定" runat="server"
                                            OnClick="btnOk_pc_Click" /><asp:ImageButton ID="btnReset_pc" src="images/btn_again.jpg"
                                                border="0" alt="重 填" runat="server" />
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                        <asp:Panel ID="Panel2" runat="server" Visible="false">
                            <table>
                                <tr>
                                    <td class="ft_brown14" id="Td1" align="left" height="40" name="addfee_title">
                                        手机操盘手网上充值
                                    </td>
                                </tr>
                                <tr class="mobile">
                                    <td>
                                        手机号码：
                                    </td>
                                    <td>
                                        <asp:TextBox ID="mobile" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr class="mobile">
                                    <td>
                                        手机版密码：
                                    </td>
                                    <td valign="top">
                                        <asp:TextBox ID="mobile_pwd" runat="server" TextMode="Password" Width="126px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr class="mobile">
                                    <td>
                                        充值卡卡号：
                                    </td>
                                    <td valign="top">
                                        <asp:TextBox ID="cardId_mobile" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr class="mobile">
                                    <td>
                                        充值卡密码：
                                    </td>
                                    <td valign="top">
                                        <asp:TextBox ID="cardPwd_mobile" runat="server" TextMode="Password" Width="126px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr class="mobile">
                                    <td>
                                        验证码：
                                    </td>
                                    <td valign="top">
                                        <asp:TextBox ID="codemobile" Style="width: 100px" class="input1" runat="server"></asp:TextBox>
                                        <img src="common/RegImg.aspx" id="regImgmobile" alt="请点击" />
                                    </td>
                                </tr>
                                <tr class="mobile">
                                    <td colspan="2" align="center">
                                        <asp:ImageButton ID="btnOk_mobile" OnClick="btnOk_mobile_Click" src="images/btn_ok.jpg"
                                            border="0" alt="确定" runat="server" /><asp:ImageButton ID="btnReset_mobile" src="images/btn_again.jpg"
                                                border="0" alt="重 填" runat="server" OnClick="btnReset_mobile_Click" />
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                        <asp:Panel ID="Panel3" runat="server" Visible="false">
                            <table>
                                <tr>
                                    <td class="ft_brown14" id="Td2" align="left" height="40" name="addfee_title">
                                        手机版换购版操盘手网上充值
                                    </td>
                                </tr>
                                <tr class="free">
                                    <td>
                                        老用户身份确认
                                    </td>
                                    <td valign="top">
                                    </td>
                                </tr>
                                <tr class="free">
                                    <td>
                                        手机号或者em、rxt号:
                                    </td>
                                    <td valign="top">
                                        <asp:TextBox ID="freeId" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr class="free">
                                    <td>
                                        密码:
                                    </td>
                                    <td valign="top">
                                        <asp:TextBox ID="freePwd" runat="server" TextMode="Password" Width="126px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr class="free">
                                    <td>
                                        验证码：
                                    </td>
                                    <td valign="top">
                                        <asp:TextBox ID="codefree" Style="width: 100px" class="input1" runat="server"></asp:TextBox>
                                        <img src="common/RegImg.aspx" id="regImgfree" alt="请点击" />
                                    </td>
                                </tr>
                                <tr class="free">
                                    <td colspan="2" align="center">
                                        <asp:ImageButton ID="btnOk_free" src="images/btn_ok.jpg" border="0" alt="确定" runat="server"
                                            OnClick="btnOk_free_Click" />
                                        <asp:ImageButton ID="btnReset_free" src="images/btn_again.jpg" border="0" alt="重 填"
                                            runat="server" OnClick="btnReset_free_Click" />
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                        <asp:Panel ID="Panel4" runat="server" Visible="false">
                            <table>
                                <tr>
                                    <td class="ft_brown14" id="Td3" align="left" height="40" name="addfee_title">
                                        手机版换购版
                                    </td>
                                </tr>
                                <tr class="mobileHG">
                                    <td align="right" width="100" height="25">
                                        手机号码：
                                    </td>
                                    <td>
                                        <asp:TextBox class="input" ID="mobileHG_username" Style="width: 120px" type="text"
                                            MaxLength="11" name="mobile_username" datatype="Mobile" msg="手机号码格式不正确" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr class="mobileHG">
                                    <td align="right" width="100" height="25">
                                        手机版密码：
                                    </td>
                                    <td>
                                        <asp:TextBox class="input" ID="mobileHG_password" Style="width: 120px" type="password"
                                            name="mobile_password" datatype="Number" msg="手机版密码格式不正确" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr class="mobileHG">
                                    <td align="right" width="100" height="25">
                                        充值卡卡号：
                                    </td>
                                    <td>
                                        <asp:TextBox class="input" ID="mobileHG_cardnum" Style="width: 120px" type="text"
                                            MaxLength="11" name="mobile_cardnum" datatype="Require" msg="充值卡卡号不能为空" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr class="mobileHG">
                                    <td align="right" width="100" height="25">
                                        充值卡密码：
                                    </td>
                                    <td>
                                        <asp:TextBox class="input" ID="mobileHG_cardpass" Style="width: 120px" type="password"
                                            MaxLength="8" name="mobile_cardpass" datatype="Require" msg="充值卡密码不能为空" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr class="mobileHG">
                                    <td align="right" width="100" height="25">
                                        验 证 码：
                                    </td>
                                    <td>
                                        <asp:TextBox ID="mobileHG_code" Style="width: 100px" class="input1" runat="server"></asp:TextBox>
                                        <img src="common/RegImg.aspx" id="Img1" alt="请点击" />
                                    </td>
                                </tr>
                                <tr class="mobileHG">
                                    <td valign="bottom" width="270" colspan="2" height="40">
                                        <asp:ImageButton class="btn" ID="btn_mobileHG_submit" Style="border-right: medium none;
                                            border-top: medium none; border-left: medium none; border-bottom: medium none"
                                            type="button" name="btn_mobile_submit" runat="server" Text=" 确 定 " src="images/btn_ok.jpg"
                                            OnClick="btn_mobileHG_submit_Click" />
                                        <asp:ImageButton class="btn" ID="btn_mobileHG_reset" Style="border-right: medium none;
                                            border-top: medium none; border-left: medium none; border-bottom: medium none;"
                                            type="reset" value=" 重 填 " name="btn_mobileHG_reset" src="images/btn_again.jpg"
                                            runat="server" OnClick="btn_mobileHG_reset_Click" />
                                    </td>
                                </tr>
                            </table>
                        </asp:Panel>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="marginTop10">
    </div>
    <div id="loginFram" style="position: absolute; top: 220px; left: 580px; z-index: 100;
        display: none;">
        <iframe src="UserLogin.aspx" width="292px" height="242px" scrolling="no" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="yes"></iframe>
    </div>
     <div id="qkFram" style="position: absolute; top: 220px; left: 580px; z-index: 100;
        display: none;">
        <iframe src="qkcl.aspx" width="265" height="170px" scrolling="no" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="yes"></iframe>
    </div>
    <div id="dogFram" style="position: absolute; top: 240px; left: 580px; z-index: 100;
        display: none;">
        <iframe src="dog.aspx" width="243px" height="158px" scrolling="no" frameborder="no" border="0" marginwidth="0" marginheight="0" scrolling="no" allowtransparency="yes"></iframe>
    </div>
    <uc2:footer ID="footer1" runat="server" />
    </form>
    <script type="text/javascript">
        $(document).ready(function () {
            $('[att=ulogin] a,').click(function () {
                var uname = $('#hidName').val();
                if (uname == '') {
                    document.getElementById('loginFram').style.display = "block";
                    return false;
                }
            });
        });
    </script>
    <script type="text/javascript">
        function Reset() {
            $("#regImg").attr("src", "common/RegImg.aspx?id=" + Math.random());
        }
        $(document).ready(function () {
            var name = $('#hidName').val();
            if (name == '') {
                $('#login').html("您好，请登录<a href=\"#\"><img src=\"images/btn_login.jpg\" border=\"0\" /></a>");
                $('#qkcl').removeAttr("onclick");
            } else {
                $('#login').html("欢迎您，<br/>" + name + "用户<br/><a href=\"OutLogin.aspx\" onclick=\"return confirm('确定退出？')\"><img src=\"images/btn_exit.jpg\" border=\"0\" /></a>");
                $('#qkcl').bind({
                    click: function () {
                        document.getElementById("qkFram").style.display = "block";
                    }
                });
                $('#opendog').bind({
                    click: function () {
                        document.getElementById("dogFram").style.display = "block";
                    }
                });
            }
            $('[att=ulogin] a,').click(function () {
                var uname = $('#hidName').val();
                if (uname == '') {
                    document.getElementById("loginFram").style.display = "block";
                    return false;
                }
            });
            $("#trLeveType").hide();
            //重填
            $("#btn_mobileHG_reset").click(function () {
                $('#mobileHG_username').val('');
                $('#mobileHG_password').val('');
                $('#mobileHG_cardnum').val('');
                $('#mobileHG_cardpass').val('');
                $('#mobileHG_code').val('');
                Reset();
            })
            $("#regImg").click(function () {
                Reset();
            });
            $("#regImgmobile").click(function () {
                $("#regImgmobile").attr("src", "common/RegImg.aspx?id=" + Math.random());
            });
            $('#regImgfree').click(function () {
                $("#regImgfree").attr("src", "common/RegImg.aspx?id=" + Math.random());
            });
            $('#Img1').click(function () {
                $('#Img1').attr("src", "common/RegImg.aspx?id=" + Math.random());
            });
            $('#ubtnClear').click(function () {
                Reset();
            });
            $('#addfee_pc').click(function () {
                //ShowLeveType();
                $("#trLeveType").hide();
            });
            $('#addfee_mobile').click(function () {
                $("#trLeveType").hide();
            });
            $('#addfee_HG').click(function () {
                $("#trLeveType").hide();
            });

            $("#btnReset_pc").click(function () {
                $("#userName_pc").val('');
                $("#softPwd_pc").val('');
                $("#cardId_pc").val('');
                $("#cardPwd_pc").val('');
                $('#codepc').val('');
                $("#trLeveType input[name='leveType']")[0].checked = true;
            })
            $("#btnReset_mobile").click(function () {
                $("#mobile").val('');
                $("#mobile_pwd").val('');
                $("#cardId_mobile").val('');
                $("#cardPwd_mobile").val('');
                $('#codemobile').val('');

            });
            $('#btnReset_free').click(function () {
                $('#freeId').val('');
                $('#freePwd').val('');
                $('#codefree').val('');
            });
            $("#cardId_pc").blur(function () {
                ShowLeveType();
            });
            $("#btnOk_pc").click(function () {
                var userName_pc = $("#userName_pc").val();
                var soft_pwd = $("#softPwd_pc").val();
                var cardId_pc = $("#cardId_pc").val();
                var cardPwd_pc = $("#cardPwd_pc").val();
                if (userName_pc == '') {
                    alert("用户名不能为空");
                    $("#userName_pc").focus();
                    return false;
                }
                if (soft_pwd == '') {
                    alert("软件密码不能为空");
                    $("#softPwd_pc").focus();
                    return false;
                }
                if (cardId_pc == '') {
                    alert("卡号不能为空");
                    $("#cardId_pc").focus();
                    return false;
                }
                if (cardPwd_pc == '') {
                    alert("充值卡密码不能为空");
                    $("#cardPwd_pc").focus();
                    return false;
                }
                if ($('#codepc').val() == '') {
                    alert('验证码不能为空');
                    $('#codepc').focus();
                    return false;
                }
                var type = 0;
                if ($("#trLeveType").css("display") != 'none') {
                    type = $("#trLeveType input[name='leveType']:checked").val();
                }
                ShowLeveType();
            })
            $('#btnOk_free').click(function () {

                if ($('#freeId').val() == '') {
                    alert('手机号或者em、rxt号不能为空');
                    $('#freeId').focus();
                    return false;
                }
                if ($('#freePwd').val() == '') {
                    alert('密码不能为空');
                    $('#freePwd').focus();
                    return false;
                }
                if ($('#codefree').val() == '') {
                    alert('验证码不能为空');
                    $('#codefree').focus();
                    return false;
                }
                $("#trLeveType").hide();

            })
            $("#btnOk_mobile").click(function () {
                var mobile = $("#mobile").val();
                var mobile_pwd = $("#mobile_pwd").val();
                var cardId_mobile = $("#cardId_mobile").val();
                var cardPwd_mobile = $("#cardPwd_mobile").val();
                if (mobile == '') {
                    alert('手机号码不能为空');
                    $("#mobile").focus();
                    return false;
                }
                if (mobile_pwd == '') {
                    alert('手机密码不能为空');
                    $("#mobile_pwd").focus();
                    return false;
                }
                //手机号码正则表达式
                var patrn = /^1[3,5,8][0-9]{9}$/;
                if (!patrn.test(mobile)) {
                    alert('手机号码格式不对');
                    $("#mobile").focus();
                    return false;
                }

                if (cardId_mobile == '') {
                    alert('充值卡卡号不能为空');
                    $("#cardId_mobile").focus();
                    return false;
                }
                if (cardPwd_mobile == '') {
                    alert('充值卡密码不能为空');
                    $("#cardPwd_mobile").focus();
                    return false;
                }
                if ($('#codemobile').val() == '') {
                    alert('验证码不能为空');
                    $('#codemobile').focus();
                    return false;
                }
                //整数正则表达式
                var zs_reg = /^-?[1-9]\d*$/;
                if (!zs_reg.test(mobile_pwd)) {
                    alert('手机密码格式输入有误');
                    $("#mobile").focus();
                    return false;
                }

                $("#trLeveType").hide();
            })
            $('#btn_mobileHG_submit').click(function () {
                var mobileHG_uname = $('#mobileHG_username');
                var mobileHG_upwd = $('#mobileHG_password');
                var mobileHG_cardnum = $('#mobileHG_cardnum');
                var mobileHG_cardpwd = $('#mobileHG_cardpass');
                var code = $('#mobileHG_code');
                if (mobileHG_uname.val() == '') {
                    alert(mobileHG_uname.attr('msg'));
                    mobileHG_uname.focus();
                    return false;
                }
                if (mobileHG_upwd.val() == '') {
                    alert(mobileHG_upwd.attr('msg'));
                    mobileHG_upwd.focus();
                    return false;
                }
                if (mobileHG_cardnum.val() == '') {
                    alert(mobileHG_cardnum.attr('msg'));
                    mobileHG_cardnum.focus();
                    return false;
                }
                if (mobileHG_cardpwd.val() == '') {
                    alert(mobileHG_cardpwd.attr('msg'));
                    mobileHG_cardpwd.focus();
                    return false;
                }
                if (code.val() == '') {
                    alert('验证码不能为空');
                    code.focus();
                    return false;
                }
            })
        });
        function ShowLeveType() {
            var prefix = $("#cardId_pc").val().substring(0, 3);
            var reg = /[eE][zZ][lL]/
            if (reg.test(prefix)) {
                $("#trLeveType").show();
            }
            else {
                $("#trLeveType").hide();
            }
        }
    </script>
</body>
</html>
